ConvertFrom

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ConvertFrom(val fileName: String, val folder: String = "", val subfolder: String = "")

Provides the path to an old config file used before updating to FzzyConfig. FzzyConfig will attempt to read the file and scrape as much data as possible from it into the new config class and format (TOML).

The old config file will be deleted after scraping

Currently valid file types for old configs:

  • .json

  • .json5

  • .jsonc

  • .toml

File searching is keyed off of the standard config folder fabric provides. If your config is in the config folder root, leave folder and subfolder blank.

Author

fzzyhmstrs

Since

0.2.0

Parameters

fileName

String - the file name of the old config, including file extension. Ex: old_config_file.json5

folder

String, optional - the folder within the ./config/ directory your config is stored in

subfolder

String, optional - the subfolder within the ./config/folder/ directory your config is stored in

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard